package cn.springboot.pioneermall.api.chat;

import cn.springboot.pioneermall.core.controller.BaseController;
import cn.springboot.pioneermall.core.domain.AjaxResult;
import cn.springboot.pioneermall.core.page.TableDataInfo;
import cn.springboot.pioneermall.robotChat.domain.HsChatMessage;
import cn.springboot.pioneermall.robotChat.service.IHsChatMessageService;
import cn.springboot.pioneermall.util.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.github.pagehelper.page.PageMethod.startPage;

/**
 * 客服问答聊天记录Controller
 *
 * @author ljxl
 * @date 2023-10-22
 */
@RestController
@RequestMapping("/manage-api/v1")
public class HsChatMessageController extends BaseController
{
    @Autowired
    private IHsChatMessageService hsChatMessageService;

    /**
     * 查询客服问答聊天记录列表
     */
    @GetMapping("/onlineChat/list")
    public TableDataInfo list(HsChatMessage hsChatMessage)
    {
        startPage();
        List<HsChatMessage> list = hsChatMessageService.selectHsChatMessageList(hsChatMessage);
        return getDataTable(list);
    }
}
